package com.whfc.common.enums;

/**
 * @Description:
 * @author: xugcheng
 * @version: 1.0
 * @date: 2019/7/23 8:48
 */
public enum DeptType {

    COMPANY(0, "公司"),

    PROJECT(1, "项目"),

    AREA(2, "工区"),

    TEAM(3, "施工队"),

    OTHER(4, "其他");

    private Integer value;

    private String desc;

    DeptType(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public Integer getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    public static DeptType parseValue(Integer value) {
        switch (value) {
            case 0:
                return COMPANY;
            case 1:
                return PROJECT;
            case 2:
                return AREA;
            case 3:
                return TEAM;
            case 4:
                return OTHER;
            default:
                return null;
        }
    }
}
